Fixing subexpression elimination