ail: Fix layout code for compressed textures
It turns out that block-compressed textures have several quirks in how the layout works. The differences are minor and make some sense, but I don't think it's possible to square this particular hole with generic code that "just works" for both cases, so we need to add conditionals.