Normalize the query when parsing parameters

This allows any errors to be caught and reported as part of the
validation process, rather than causing the builder to blow up and
trigger a 500 error.