Builder: Fix parser directive refactoring
Builder: Fix parser directive refactoring

Signed-off-by: John Howard <jhoward@microsoft.com>

rewritten from github.com/moby/moby c97170d618b7a1f35f47672143bd287666802287

tonistiigi/buildkit_poc,tonistiigi/buildkit_poc