PHP-1280: Add extra check for underflow, which theoretically could happen

Can't find a test case for this though.