Fix the search plugin crashing the military screen.

The cause of the crash is that the right list is used for multiple
different things in different pages, so when cleaning up after a
page switch it is not acceptable to mess with it in any way. However
the search plugin changed its length, thus causing a crash if the
new contents were shorter than the original candidate list.