Fixed potential exception. NOTE: The code completion engine isn't ment
to insert text - this functionality should be moved to the IDE
on-the-fly formatting/indentation backend.