Thank you very much indeed @contentiskey and @swansonphotos for your help. I’ve discovered that it was AJAX loading that was causing the problem. Disabling AJAX loading has fixed things. Hopefully this info will be useful to anyone else with the same issue.