Fix query-style expansions test

Probably not an ideal fix.

This RFC is _really_ complicated to get right :/