prevent merging of type error code from different locations. fixes #7372