Bugfix for 439510f (reported by @saketkc).

Previous logic for determining if state had been calculated for workflow steps in workflow run module would only work for data input steps - this new logic should work for data input or tools.