Fix bug (accidental buffer creation) on ending fold search in an unnamed buffer