Fix llvm::removeUnreachableBlocks to handle unreachable loops.