updated for version 7.0036
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 2b43dc5..84cb391 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8085,6 +8085,11 @@
 ex_startinsert(eap)
     exarg_T	*eap;
 {
+    /* Ignore the command when already in Insert mode.  Inserting an
+     * expression register that invokes a function can do this. */
+    if (State & INSERT)
+	return;
+
     if (eap->forceit)
     {
 	coladvance((colnr_T)MAXCOL);