Replace a couple asserts with static_asserts.