SOLVED: Custom theme went nuts, couldn't even load preferences

In case anyone else has the same issue, my problem was that my custom theme was pulling in themes/default.php:

@import "../themes/default.php";

But that was deleted in git commit 15d05e8a26991dd7435b17c6a43cb60cf1175947;

Replaced with the following:

@import "../css/default.css";

And all is well.