That seems to have been unreliable. Luckily the original g-code is already broken up in layers, so searching it is completely unnecessary.
Hopefully resolves issue #5630.
People are reporting that the retraction is reversed. We can't test it since we have no firmware that supports the command at all. So we'll just not make the retract distance negative. That seems more logical anyway if you read the documentation of M600 to the letter.
Fixes#4249.