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