Fixing CARBON-14934 - Circular buffer implementation is generified