This commit reverts 5099e015 and 77396bbc, which broke the build in various ways. I'm reverting until I can investigate, since that change appears to be way more subtle than it seemed.