Fixed an issue with widgets, where dynamically adding or inserting them during response to and SDL event would cause iterator invalidation.