Revert "Merge pull request #2833 from mamhoff/new-bugfix-autocomplete"

This reverts commit 2450d284c50437d7a953488ff40bb8e40c8adf55, reversing
changes made to 489078bfcfce155bec58a4a544dc38b0e4e11cd1.