PHI node entries do not match predecessors!

I have used SplitBlockAndInsertIfThen() to split a basic block, inserted a few instructions in the Then block and Tail block. For a few subjects I am receiving the following error: “PHI node entries do not match predecessors!”. Looking into the source(http://llvm.org/doxygen/Verifier_8cpp_source.html), it says:

// Check to make sure that the predecessors and PHI node entries are
2243 // matched up.
2244 Assert(Values[i].first == Preds[i],
2245 “PHI node entries do not match predecessors!”, PN,
2246 Values[i].first, Preds[i]);

Can anybody throw in any idea how it can relate to splitting BB and inserting new instructions?