Fix issue where a class might get a shadow from the wrong package if the names match.