[BUGFIX] DI fails with CompilerDefinition; solves #5738
[BUGFIX] DI fails with CompilerDefinition; solves #5738 - Test
[BUGFIX] DI fails with CompilerDefinition; solves #5738 - Test - trailing spaces removed
[BUGFIX] DI fails with CompilerDefinition; solves #5738 - Test - assertions on false added
Merge pull request #5739 from michaelschiller/di_compilerdefinition_fix

[BUGFIX] DI fails with CompilerDefinition; solves #5738
[#5739] CS fixes

- trailing whitespace
Merge branch 'hotfix/5739'

Close #5739