When adding a comment at the end of a line (a common use when typing straight ahead) that only has a left part (like with ft=cpp, where the comment string is "// "), there is an audible beep and an additional space character is inserted (yielding "// "). Suppress the attempted cursor move to the right (which fails in that case) via :silent!. Use :startinsert! (with a bang) to continue editing at the end of the line instead of the workaround that inserts an additional space.
This was broken by the refactoring that introduced s:CreateMaps().