diff --git a/lib/lyx2lyx/lyx_2_6.py b/lib/lyx2lyx/lyx_2_6.py
index 386070cf9f..c8e49f79f0 100644
--- a/lib/lyx2lyx/lyx_2_6.py
+++ b/lib/lyx2lyx/lyx_2_6.py
@@ -991,6 +991,12 @@ def revert_numeric(document):
             at_word_start = False
             i += 1
             continue
+        # Skip inset parameter lines (e.g. CommandInset's reference/name/key), not real text.
+        inset = get_containing_inset(document.body, i)
+        if inset and find_token(document.body, "\\begin_layout", inset[1], i) == -1:
+            at_word_start = False
+            i += 1
+            continue
         # Merge consecutive plain-content lines: a bare newline
         # between them is just a soft line-wrap, not a boundary.
         j = i
