Initially thought it was my error but checking through the examples I see that
Bundle11 does the same.
When <Payload Name="bafunctions.dll" Compressed="yes" SourceFile="bafunctions.dll" /> is added to the .wxs file it appears to be overriding the value assigned to the InstallFolder variable and changes it
to C:\Windows\Microsoft.NET\Framework64\v3.5\ (Win 8.1) or c:\WINDOWS\Microsoft.NET\Framework\v3.5\ (Win XP)
Tested on various different pc's & os versions and results are the same.