core: Fix name-to-id cache invalidation