Fix a potential NRE in BufferGenerator.Reset