Fix WK-56 and WK-58, exception in SRI API and incorrect handling of multiple PyTransform commands in the history