stop a buffer from stepping on itself under recursion

Partial fix for issue #15.