Buffer has to be reallocated on each loop iteration
Support for IS_INDIRECT