Reset infinite scroll element when re-rendering from parent

Works exactly the same as before, except now it resets the count/page if you re-render/update the parent item.

Also fixes an undefined reference.