Fix exception when trying to open the definition of a primitive type