rank_filter.hxx: Moved declarations outside of loops.