flow: handle known switch statements