Fix an issue in which nested types were not being correctly identified…

…unless they happened to be in a package without a dot.