Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 12591)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 12592)
@@ -17,4 +17,5 @@
 import java.util.Iterator;
 import java.util.LinkedList;
+import java.util.Optional;
 import java.util.Set;
 
@@ -250,9 +251,9 @@
      */
     private boolean giveUserFeedback(MouseEvent e, int modifiers) {
-        Collection<OsmPrimitive> c = asColl(
+        Optional<OsmPrimitive> c = Optional.ofNullable(
                 mv.getNearestNodeOrWay(e.getPoint(), mv.isSelectablePredicate, true));
 
         updateKeyModifiersEx(modifiers);
-        determineMapMode(!c.isEmpty());
+        determineMapMode(c.isPresent());
 
         Set<OsmPrimitive> newHighlights = new HashSet<>();
@@ -272,16 +273,14 @@
 
         // return early if there can't be any highlights
-        if (!drawTargetHighlight || mode != Mode.MOVE || c.isEmpty())
+        if (!drawTargetHighlight || mode != Mode.MOVE || !c.isPresent())
             return repaintIfRequired(newHighlights);
 
         // CTRL toggles selection, but if while dragging CTRL means merge
         final boolean isToggleMode = ctrl && !dragInProgress();
-        for (OsmPrimitive x : c) {
+        if (c.isPresent() && (isToggleMode || !c.get().isSelected())) {
             // only highlight primitives that will change the selection
             // when clicked. I.e. don't highlight selected elements unless
             // we are in toggle mode.
-            if (isToggleMode || !x.isSelected()) {
-                newHighlights.add(x);
-            }
+            newHighlights.add(c.get());
         }
         return repaintIfRequired(newHighlights);
@@ -295,5 +294,5 @@
      * @return the cursor that should be displayed
      */
-    private Cursor getCursor(Collection<OsmPrimitive> nearbyStuff) {
+    private Cursor getCursor(Optional<OsmPrimitive> nearbyStuff) {
         String c = "rect";
         switch(mode) {
@@ -303,6 +302,5 @@
                 break;
             }
-            final Iterator<OsmPrimitive> it = nearbyStuff.iterator();
-            final OsmPrimitive osm = it.hasNext() ? it.next() : null;
+            final OsmPrimitive osm = nearbyStuff.orElse(null);
 
             if (dragInProgress()) {
@@ -526,5 +524,5 @@
                 needsRepaint = true;
             }
-            mv.setNewCursor(getCursor(asColl(p)), this);
+            mv.setNewCursor(getCursor(Optional.ofNullable(p)), this);
             // also update the stored mouse event, so we can display the correct cursor
             // when dragging a node onto another one and then press CTRL to merge
