That debian/rules code seems fragile. Beyond sid, it also doesn't recognize several other valid upload targets: experimental, oracular (for Ubuntu), devel (for Ubuntu), forky (not valid yet but it will be the release after trixie).
Thank you, Jeremy Bícha