[fixed] Preserve original query with HashLocation

Fixes #636