Make let-matching work in Rules again
A RULE is supposed to match even if there is an intervening let:
RULE f (x:xs) = ....
target f (let x = thing in x:xs)
It's surprisingly tricky to get this right; in effect we are doing
let-floating on the fly. I managed to get it wrong before, or at least
be over-conservative. And in "fixing" that I got it wrong again in a
different way, which made it far too conservative. In particular, it
failed to match f (let x = y+y in let z=x+y in z:xs)
because the binder x was cloned and looked "locally-bound". See the
ever growing comments with the Let rule for details.
That patch reverts to the previous story, which is still a bit too
conservative, but not so egregiously so. Fixes Romans's problem.