Ignore comments when detecting } in the source code.

Fixes scala-ide-#1002047.