Prevent insert_lines from being treated as regex

Fixes RM #2083, #1898