Fixes two small bugs including one regression. MFC after: 3 days Merge commit 'ab1f1aa8333369a83ff284848fc3fc2e52d5f29f'
Security: NtpBUg3767, NtpBug3808, NtpBug3807 (CVE-2023-26555) MFC after: immediately