It’s indeed a bug in JOSM, it will be fixed in new builds

https://josm.openstreetmap.de/ticket/15545