Write tests for the `match?` macro
Wrap `match?` in a function to contain scope

To keep variables from leaking out when calling match, we just need to
wrap the match evaluation up into a function which is immediately
called.

Fixes #1304