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
Merge pull request #3505 from danslo/patch-1

also advance to end of array for object-based observers
Do not insert an Itemid field in the search form.