Fixed a crash when a class/module has a constant of itself (e.g. Object)