Only permit record wildcards in last position. Fixes #37.
Add test case for #37.