Fixed bug in convert foreach to for.
Improved speed of automatic import symbol completion.