Enable terrain and fix a race condition.

The race could makes tiles sometimes not show up as wireframe when they
should.