Correct WorkspaceSelector to avoid duplicate workspace names

re #6227
Merge remote-tracking branch 'origin/bugfix/6227_sans_1d_analysis'