Refs #9369 Add check for end of iterator.
Merge branch 'feature/9369_upgrade_history_gui' into develop