Avoiding storing references to Imported<ResourceGenerator>