This does not update the metadataMap, and is kind of confusing.  Instead of getMyModifiableLibrary, I would suggest calling getMyLibrary(), clearing the library, and then calling updateLibrary with the results from getMyLibrary.  I think it's clear what that's doing.