[9.18] fix: usr: Fix NSEC3 closest encloser lookup for names with empty non-terminals
requested to merge backport-4950-bind-logs-expected-covering-nsec3-got-an-exact-match-9.18 into bind-9.18
The performance improvement for finding the NSEC3 closest encloser when generating authoritative responses could cause servers to return incorrect NSEC3 records in some cases. This has been fixed.
Closes #4950 (closed)
Backport of MR !9610 (merged)