This takes care of the FIXME regarding breaking it out for more general use (the time has come to redo constant folding).