Ported SplitIfAction.