Added better type inference for a call / cast expression
(cherry picked from commit 331879a)