Avoid circular imports https://bugs.debian.org/1069838 reported a test failure due to circular imports. While I couldn't reproduce this locally, I could reproduce it in a VM provided by the bug reporter, and it seems straightforward enough to avoid the problem.