use the correct type expression for type applications that contain type unions (#714)