initial pass to get rid of the compile errors caused by the buffer reusing code in xgb.