Allow whitespace following unioned query

Fixes #1575