Track type of ternary expressions (fixes an issue)