re #8970 Check ws belongs to group before inserting it

This get rids of warning message in SANS reduction due to inserting
workspace to a group which already had that workspace.
Merge branch 'feature/8970_warning_msg' into develop