Yet more nEndInvalid/COMPLETE_STRING fixes

...to fix -fsanitize=signed-integer-overflow

Change-Id: I713dabd49b5a6085b2e40510540a20441f0c3541