Shouldn't this `assert_valid_keys`?