Both bugs only show up when an operand has been changed due to constant folding.