Fix gcylc task insertion (stop cycle was ignored).
Merge pull request #878 from hjoliver/fix-gcylc-task-insertion

Fix gcylc task insertion (stop cycle was ignored).