Fix #13721. Filter before .remove() loop so positionals work. Close gh-1221.