changes in function LLVMFlattenInsertChain