also advance to end of array for object-based observers

This is a backport to the 2.5 branch, see the following:

https://github.com/joomla/joomla-cms/commit/791f5612ac7305f94789411f4c3fc459c91077a5