Fixed looping in auto-complete on mistyped class (fixes #130).