deadlock when typing ( after a foreach token