Fix undefined index notice in Special:Search

Instead of insert after 'help' (which has been removed),
insert before 'all'. Also added test cases.

Bug: 66410
Change-Id: I17cc79cf8fd004b3d21110d685ebcba47e88b268
Merge "Fix undefined index notice in Special:Search"