Remove LocalImageCacheHandle hack and associated unsafe code.