fixed another side-effect-free problem in generating lhs

need to take into account the effect of dereferencing pointers