rmask_avg fixes in set_filter.F