This code is required by transformation passes which are being moved into a separate package, but is too complicated to simply copy. Therefore, I decided to move them into a new package.