Yes and if you look at the changes the net40.config are merging in - then you will see that DNN is NOT actually running as a 4.0 application - see below.
All the merge is doing is fiddling around the edges to allow dnn to run on a asp.net 4.0 configured hosting BUT without ANY of the advantages that 4.0 actually brings.
AS SUCH none of the 4.0 core assemblies are being targeted and the 4.0 compilers are not being targeted - as a result if for example you include any asp.net 4.0 compiler features in a wsp project it will crash in a heap.
======================
<configuration>
<nodes configfile="Web.config">
<!-- Update System.Web HttpRuntime to support .NET 2.0 style request validation -->
<node path="/configuration/system.web/httpRuntime" action="updateattribute" name="requestValidationMode" value="2.0" />
<!-- Update System.Web.Extensions redirect -->
<node path="/configuration/runtime/ab:assemblyBinding/ab:dependentAssembly[ab:assemblyIdentity/@name='System.Web.Extensions']" action="update" targetpath="/configuration/runtime/ab:assemblyBinding/ab:dependentAssembly[ab:assemblyIdentity/@name='System.Web.Extensions']/ab:bindingRedirect" collision="save" nameSpace="urn:schemas-microsoft-com:asm.v1" nameSpacePrefix="ab">
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0" />
</node>
<node path="/configuration/runtime/ab:assemblyBinding/ab:dependentAssembly[ab:assemblyIdentity/@name='System.Web.Extensions.Design']" action="update" targetpath="/configuration/runtime/ab:assemblyBinding/ab:dependentAssembly[ab:assemblyIdentity/@name='System.Web.Extensions.Design']/ab:bindingRedirect" collision="save" nameSpace="urn:schemas-microsoft-com:asm.v1" nameSpacePrefix="ab">
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0" />
</node>
</nodes>
</configuration>