Returned back diagnostic exception as we can't reproduce problems with all red code around Scala code. Probably it relates.
(cherry picked from commit feedc0a)