Constants are not getting merged together correctly when types are resolved