Java Document.append() does not append

It took me a while to see why this code produces the results I am getting

          Document query = new Document("key1", new Document("$ne", null));
           query.append("$or", Arrays.asList(
                   new Document("key2", new Document("$exists", false)),
                   new Document("key2", "active"),
                   new Document("key2", null)));
           query.append("$or", Arrays.asList(
                   new Document("key3", new Document("$gt", new Date())),
                   new Document("key2", false)));

Running the code results in

09/09/2022 10:10:57,972 | HTTP-Dispatcher | INFO | ServiceRegistryDAO.list | {"key1": {"$ne": null}} 
09/09/2022 10:10:57,972 | HTTP-Dispatcher | INFO | ServiceRegistryDAO.list | {"key1": {"$ne": null}, "$or": [{"key2": {"$exists": false}}, {"key2": "active"}, {"key2": null}]} 
09/09/2022 10:10:57,974 | HTTP-Dispatcher | INFO | ServiceRegistryDAO.list | {"key1": {"$ne": null}, "$or": [{"key3": {"$gt": {"$date": "2022-09-09T09:10:57.972Z"}}}, {"key2": false}]} 

I would expect the 3rd append() call to add the key3 conditions to the end of the document. Instead it overwrites the key2 conditions. Looking at Document it seems that append() is actually a Map.put() and I am overwriting the existing “$or” key.
If I have read that correctly, this violates the principle of least surprise and means that I can’t have more than one “$or” in the same BSON document, at least in the Java driver.
I guess the workaround will be an explicit “$and”.