added a regression test for the bug when a S4 is exported by a pkg loaded with load_all(, export_all = FALSE), then imported by another pkg. Also provided a (possible) fix for the bug based on base::loadNamespace()