Make rule-matching robust to lets