Re #8025. Fixing logic in CreateGroupingWorkspace.

This was configuring the grouping workspace twice if the user specified
loading it from a file. That was the source of the performance hit.
Re #8025. Moving code from header to source.
Merge remote branch 'origin/bugfix/8025_wish_performance'