assertion badly triggered in tests of UTFGridPosition

* convert assertion to exception, as nobody noticed this before
* move tests to where they belong