Some syntax in powershell scripts do not cause the script task to exit with the proper exit code.
Example:
$Host.SetShouldExit(99)
Causes the script to exit with error code 0 making it seem like everything in the script was successful
This was caused by the fix to another issue.
ITMS 7.x, 8.x
There are three solutions to this issue.
Environment]::Exit(98)