Work around a bug in clang
Under some circumstances, the take() method of QScopedPointer seems to cause a crash on macOS, probably because of an issue in the compiler? It's the only place where we use clang.
BUG:413444