Fixed #5943: Fix a issue of cached texture loading