Fix rare crash on sound events, and loss of schematics issue.  Fixes #882.