Fix error when deleting workspaces.

Refs #8316.
Merge branch 'feature/8316_error_deleting_workspaces' into develop