when testing if an identifier refers to a calculated aesthetic, check the whole identifier, not a substring

Reissue of #835.