Fix attachment of operators in global namespace

Previous tests failed to check whether this worked in the global
namespace.
Merge branch 'fix-attach-operators' into develop