Texture cache bug fixes