refining warnings reported by type consistency analysis