Multivalued fields are represented in SolrDocument as java.util.Collection.
ClientUtils#toSolrInputDocument(SolrDocument d) creates shallow copy of the collections in resulted SolrInputDocument.
That means that changes to resulted instance (i.e. adding/removing records) affect original instance as well, which is bad.
Expected Behaviour: Deep copy of collections should be created. Changes to resulted instance shouldn't affect original instance
Note: Believe the same issue is true for ClientUtils#toSolrDocument(SolrInputDocument d)