[coretext] More scratch buffer fixes