kernel: Fix kernel build when compiled without INVARIANTS.