cleanup ModelTreeElement::readElementDataFromBuffer() to not read the buffer twice
fix warning