Move check_if_ipmask() from support.* to match.*.