As a result:
if the application1's layer does not contains the module required by application2, then it will be loaded from the separate file (it resolve to the right URL, but the layer become useless).
Even worse if application1's layer contains the module it loads it from here, but the version might be totally different!

I do use contextual requires in my project but I inject only "packages".
So far we had no issues with this property: it works on our setup (both build and dev), but we don't read the values over dojo/_base/config

I'm not sure if this fully helps clarify what the expected behavior is, but I think it clarifies for me that you should rely on the values in dojo/_base/config for that particular version of Dojo rather than reading the global dojoConfig.

I've done some research into the behavior described in the require-test.zip example, and I now believe that this is not a regression. Rather, it appears to be a confluence of two issues that are causing the build to behave differently than the unbuilt code.

I've modified the test case slightly to allow it to build in a pure Dojo environment (no external dependencies) and attached that file. To run the build, copies of dojo, dijit, dojox, and util have to be dropped into the src/js/jsapi folder and then the project can be built with node src/js/jsapi/dojo/dojo.js load=build --profile ./build/activity-dashboard-amd.profile.js, run from the root folder.

With that modified example, I was able to reproduce the behavior that the configuration was not being passed through. After researching the issue, I discovered that none of the configuration was available, not even Dojo's default values. This lead me to investigate how dojo/_base/config was loading. It turns out that this line: ​https://github.com/dojo/dojo/blob/master/_base/config.js#L152 was resolving to undefined in the built code. That led me to dojo/has, which is the place that the issue is stemming from.

The layer in the build profile has customBase: true, which excludes many of Dojo's standard configuration data from the build. Among the exclusions is the setting to add in "dojo-has-api" to 1 in dojo/has. That means that when the dojo/has module is loaded at runtime, this line (​https://github.com/dojo/dojo/blob/master/has.js#L19) comes up undefined, and a new has module us built, without the previous values. Setting customBase to false resolves this issue and the built code code behaves as expected.

Another way to resolve this issue would be to include dojo/has in the layer. Since the profile has 'dojo-has-api': 1 in the staticHasFeatures hash, it will allow dojo/has to be loaded properly and, once again, the built code behaves as expected.