Fix pagerfanta handlers when the result isn't an array but a traversable object