Fix minor issue with where command.

If the system is not updated against the current stage of the portage tree, some stray '*' and '%' symbols can appear
after USE or EXPAND_USE flags. Searching for a flag may fail in this case. This is not officially supported but the bug
was found, thus fixed.