nginx: refactor xyz check
tileserver: fix errors around bit op