Fixes an issue in the ToThrow matcher.