Fix typo in closestType() (see also 83fb8877, fixes #716)