Fix case sensitivity for special class names

The current behaviour in the name resolver visitor is incorrect as special class names are case-insensitive as demonstrated here:
http://3v4l.org/4g7Hj
The code does not change the name case, just ignores the case when checking for the special class names. The original casing should be preserved.