Well, I'm no C expert and also not a DNS RFC expert, but it seems the fix in 1.18.0 mentioned in the earlier thread I linked was altered in 1.19.0:
Fix in 1.18.0:
Another fix (?) within the same code in 1.19.0:
Not sure what's going on there though. Something has changed and I assume for the better? Perhaps sounds like the second change has reverted the Unbound stricter compatibility with the DNS specs with regard to the SOA RR that has to come with the NOERROR reply.
@jcjones Do you perhaps have an opinion with regard to this issue? (As you seem to be involved in the upgrade to 1.18.0 earlier.)