Improve performance when retrieving a registered object by its class