Added test of classes with the same names but different namespaces. Closes #1660.