Support irregularly sized tiles

Tiles along layer edges can now be clipped to the layer size. This
saves memory along tile edges.
Oops. I let this one slip through. I'll fix it.