ensures we close any .xbt packs regardless of whether we've taken a texture from them or not - closes #10876 (cherry picked from commit e290672a)