Fix for Bug 92089

- fixed issue where a trait generated on the fly could not be resolved
- revert _apply_all_roles to use _load_user_class
- revert unit tests to not check for files
- added test for bug regression