We know at this point that filter_num is good, hence filter_get()
returns non-NULL, but gcc-13's static analyzer does not see this and
warns. The added assertion makes the warning go away and tells the
reader that f == NULL is considered impossible here.