UIKit: Fixed deadlock in ResourceCache