fix Issue 12769 - ICE returning array
Merge pull request #3559 from 9rnsr/fix12769

[REG2.065] Issue 12769 - ICE returning array
Fix implicit conversion to bool
Remove unused and shadowing variable
Merge pull request #3563 from yebblies/boolconvx

[DDMD] Fix implicit conversion to bool
Merge pull request #3560 from yebblies/shadowidents

[DDMD] Remove unused and shadowing variable