Do not compare the string length of the file path to the class definition.

Fixes #1624.