Fix a nasty bug in RULE matching: Trac #4814
See Note [Matching lets], which explains it all in detail. It took me a day to think of a nice way to fix the bug, but I think the result is quite respectable. Subtle, though.
Showing with 272 additions and 192 deletions