Fix port from ATS.
A few patches didn't come over correctly when I ported in the ATS
patches. I verified that with this patch, the source code is now
identical with the ATS version.
Point release - Backwards compatible change that requires only a recompilation.
Minor release - Backwards compatible change that requires trivial / obvious code changes to preserve the same functionality / semantics. E.g. a method name change.
Major release - Semantic changes that require restructuring or redesign of client code.