fix Issue 12016 - implicit immutable upcast becomes null in CTFE
Merge pull request #3168 from 9rnsr/fix12016

[REG2.065a] Issue 12016 - implicit immutable upcast becomes null in CTFE