If the world is built and installed with WITHOUT_ZFS, then make -DBATCH_DELETE_OLD_FILES delete-old-dirs will give the error:
rmdir: /etc/zfs: Directory not empty
because /etc/zfs/compatibility.d is still there.
I'm not sure if this patch is the correct way to resolve the problem, since in my case /etc/zfs/compatibility.d is an empty directory (and thus can be safely removed with rmdir(1)), but I'm not sure if this will always be the case.