I fully agree that deciding to rewrite a chunk of code for a single bug may not always the first choice to come up with
note: last year, the parser/execution engine of cmd.exe has been rewritten - as it was missing a couple of needed features - and the same interrogation arose: patch the existing spaghetti, or rewrite; we went for second option.
very good news that you can spend some time on extending the changes to cover multi criteria search
a couple of side notes:
* usually it's good practice to have tests showing the intended behaviour. but writing tests for cmd.exe is a pain (I've been here <g>), let me know if you need some help/advice here * you could keep this Merge Request open and update your patch(es) inside this MR when they are ready (so that we keep all discussions in one place)