Fix script autocompletion. Refs #6710
Merge branch 'bugfix/6710_broken_autocomplete' into develop