Fix for WK-58: Karma executes the wrong PyTransform command

Makes sure that the previous command from history is from the same
worksheet