PROBCORE-522 Improved the implementation of how operations are executed within Trace and StateId