Improve previous commit and make it compile (hopefully)
Merge branch 'ncn-devel' into prettier-cities-2
Change the previous solution slightly to feed into GCC's optimizer better.
Merge branch 'ncn-devel' into prettier-cities-2