Issue SI-4824. Fixes stack overflow bug when parsing long multiline comments