Fix issue #586

If a stub throws an exception the `invoking` flag should be deleted,
so the stub can be reset without throwing an error.
Merge pull request #588 from codazzo/fix-issue-586-reset-throwing-stub

Fix issue #586