Fixed a small bug in SGScriptScanner.