wx Tasklist: Protect against out-of-range search results

Fixes #306