Cognitive flexibility supports preschoolers’ detection of communicative ambiguity