Review recent rewrite using CI tests
The GitLab CI test infrastructure is just about functional enough to start being useful as an aid in reviewing code. Here are a series of patches which address issues that it has identified. They're spread thinly so you can see the effect each one has on the CI job results, but I'm proposing that they all be squashed together prior to merge.