This removes a loop variable from pfilter.run() and ensures that we always retrieve earlier states with the correct particle ordering.