Fix error new group originalRoles null condition (original pull request #301)

This is a PR to address the issue on the original pull request #301 (which has since been closed leaving the issue unresolved), with the logic in the RestoreRolesTransformer and the unit test updated as requested.