For me it looks like a memory corruption bug or smth., I remember years ago on one line value of variable is one a few lines down is completely another, even though nothing modified the value.
The register for Order Classes is common for Sales orders and Service orders. When I set an Order Class to create an Activity - it works for Sales Order, while for Service Orders - not. Is any setting...