kio_filenamesearch: don't use iterators when searching pending dirs
Looking at the backtrace from the bug report, it looks like the vector could get reallocated when it changes capacity ...etc, which would invalidate iterators.
Instead use back() and pop_back(); this is better anyway since erasing elements at the back of a vector is faster than anywhere else.
BUG: 448114 FIXED-IN: 22.04.1