Move bailout-return building into separate function