When overriding an upstream method, copying the original method code should always be a last resort, as the two code bases tend to get out of sync and it often becomes hard to spot the modifications done by the override. Both those issues can be avoided when figuring out a way to split out the modifications and call the unmodified upstream method - we are in luck with our checkWorkspaces() override, as we can trick the upstream method into not removing workspaces we want to keep instead of copying the method altogether. https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/33