    # File lib/prawn/document.rb, line 510
        def group(second_attempt=false)
          old_bounding_box = @bounding_box
          @bounding_box = SimpleDelegator.new(@bounding_box)

          def @bounding_box.move_past_bottom
            raise RollbackTransaction
          end

          success = transaction { yield }

          unless success
            raise Prawn::Errors::CannotGroup if second_attempt
            old_bounding_box.move_past_bottom
            group(second_attempt=true) { yield }
          end

          @bounding_box = old_bounding_box
        end