Parented Entity allocateKey method bug fix