Track changes in sg when grammar changes again
Precautious handling of currentGrammar in sg