have_posts is empty on category.php

OK, it turns out that a simple function on the pre_get_posts filter does the trick. The issue was that custom post types aren’t included in the default query.