This response is misleading and wrong IMHO.
getLocalName() called on a resource is part of the API. The behavior is at least inconsistent even if no serialization is involved.
I.e. for an URI like 'namespace:1' getLocalName() returns an empty result. Same code returns 'a' for 'namespace:a'. Serialization and deserialization is fine for both cases.