Adds optimization for expressions with constants on the RHS (or either side for operations where side does not matter)