Partially fix the previous merge

- the setTile function (from master) is now used when building the level
layers, which was causing the collision grid to be populated when not
required (during level loading, which was causing an exception as the
collision grid object was not even created)