Fix bug #10159 with crashes in auto-complete package.