Expand macros in patterns

First commit is an unrelated fix for a test suite warning I introduced last week.