[WELD-1215] Complete the fix for missing nested classes and other possible class loading anomolies

Makes the original WELD-1215 patch more robust.