PHINode::getBasicBlockIndex is O(n) in the number of inputs