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.
Thanks for the report. Pentagram has now been integrated into ScummVM, and I've fixed this in the ScummVM version.