The patch for MDSAL-572 encountered this. Resolveing leafref with more than one level of dots(..) separated by an identifier results in normalizing of the xpath, which is trying to call remove() on an UnmodifiableCollection.