CORE-5763: fixed a bug in the edit-workflow and copy-workflow services