Better errors for types with same name

Fix for issue #1419. Added a pretty unobtrusive fix but I'm wondering if I need to have more complicated logic (like typeToString() does) to handle certain cases that simply calling getFullyQualifiedName doesn't take care of.