value flow: improved handling of cast