My guess it may have smth to do with UpdateGoodsReceiptsAvailQty(). (I am not sure why is the purpose of this)
You can probably comment out it and see what happens.
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...