I believe this has been fixed in the ScummVM version, but if I'm honest I'm not 100% sure how I fixed it - I was able to reproduce it, then I made a bunch of updates to the usecode engine as part of Crusader support, and now I can no longer reproduce it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I believe this has been fixed in the ScummVM version, but if I'm honest I'm not 100% sure how I fixed it - I was able to reproduce it, then I made a bunch of updates to the usecode engine as part of Crusader support, and now I can no longer reproduce it.