Fix constant lookups on metaclass of objects