After reading through various upstream issues I discovered an issue for this:
https://github.com/avahi/avahi/issues/668 It is referenced in PR https://github.com/avahi/avahi/pull/844 But that appears to have been closed with no explanation and without being merged. It has links to another repository that contains the fix: https://github.com/damiank89/avahi/commit/6e92f14a72168ba2b3473c38cd2b8af7923ab8f9

