All tests pass once again.
And let that be a lesson to all: refactoring code is a pain