Merge "Improve recognition of select-based period induction."