Fix terrain layering bug.

The fix is pretty simple. I just create two svg groups, one for terrain and one for details, and then add terrain tiles to the terrain group and details to the details group.