Misc minor kernel-related changes.

`std::count(occupied.begin(), occupied.end(), true)`?