Buffer with time and merge fix

Bug report #1867.

I'm not sure if the wrong guard in merge contributed to this bug or not.