I don't yet understand how all the building of the layouts is being done. But, if we're dynamically building the `layout.prod.html.twig` in production, why not instead *always* build the layout file. What I mean is:

* have some file - `layout.default.html.twig` which looks like `layout.dev.html.twig`
* in the "dev" build of Grunt, copy `layout.default.html.twig` to `layout.html.twig`
* in the "prod" built of Grunt, copy `layout.default.html.twig` to `layout.html.twig` and run any additional transformations.

Then, you're always pointing to `layout.html.twig` and whether that will be loading compiled assets depends on which Grunt task you're running only (not the Symfony environment).

Or maybe this doesn't work because I'm missing something :)