Fix various ANY conditions that aren't correctly being considered.