Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Lanes.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Lanes.java	(revision 7495)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Lanes.java	(revision 7497)
@@ -1,4 +1,12 @@
 // License: GPL. See LICENSE file for details.
 package org.openstreetmap.josm.data.validation.tests;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.regex.Pattern;
 
 import org.openstreetmap.josm.Main;
@@ -9,11 +17,4 @@
 import org.openstreetmap.josm.tools.Predicates;
 import org.openstreetmap.josm.tools.Utils;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
 
 /**
@@ -35,6 +36,7 @@
 
     protected void checkNumberOfLanesByKey(final OsmPrimitive p, String lanesKey, String message) {
-        final Collection<String> keysForPattern = Utils.filter(p.keySet(),
-                Predicates.stringContainsPattern(Pattern.compile(":" + lanesKey + "$")));
+        final Collection<String> keysForPattern = new ArrayList<>(Utils.filter(p.keySet(),
+                Predicates.stringContainsPattern(Pattern.compile(":" + lanesKey + "$"))));
+        keysForPattern.remove("source:lanes");
         if (keysForPattern.size() < 1) {
             // nothing to check
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 7495)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 7497)
@@ -28,4 +28,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.awt.GraphicsEnvironment;
 import java.io.File;
 import java.io.IOException;
@@ -265,14 +266,16 @@
             return false;
         }
-        // JOSM certificate not found, warn user
-        StringBuilder message = new StringBuilder("<html>");
-        message.append(tr("Remote Control is configured to provide HTTPS support.<br>"+
-                "This requires to add a custom certificate generated by JOSM to the Windows Root CA store.<br><br>"+
-                "You are now going to be prompted by Windows to confirm this operation.<br>"+
-                "To enable proper HTTPS support, <b>please click Yes</b> in next dialog.<br><br>"+
-                "If unsure, you can also click No then disable HTTPS support in Remote Control preferences."));
-        message.append("</html>");
-        JOptionPane.showMessageDialog(Main.parent, message.toString(),
-                tr("HTTPS support in Remote Control"), JOptionPane.INFORMATION_MESSAGE);
+        if (!GraphicsEnvironment.isHeadless()) {
+            // JOSM certificate not found, warn user
+            StringBuilder message = new StringBuilder("<html>");
+            message.append(tr("Remote Control is configured to provide HTTPS support.<br>"+
+                    "This requires to add a custom certificate generated by JOSM to the Windows Root CA store.<br><br>"+
+                    "You are now going to be prompted by Windows to confirm this operation.<br>"+
+                    "To enable proper HTTPS support, <b>please click Yes</b> in next dialog.<br><br>"+
+                    "If unsure, you can also click No then disable HTTPS support in Remote Control preferences."));
+            message.append("</html>");
+            JOptionPane.showMessageDialog(Main.parent, message.toString(),
+                    tr("HTTPS support in Remote Control"), JOptionPane.INFORMATION_MESSAGE);
+        }
         // install it to Windows-ROOT keystore, used by IE, Chrome and Safari, but not by Firefox
         Main.info(tr("Adding JOSM localhost certificate to {0} keystore", WINDOWS_ROOT));
