(PUP-501) More checks for resource expressions

This adds checks for the behavior of duplicate titles and variations on
type names.