Currently if you try to restrict PAPPL to advertising locally with the "-o listen-hostname=localhost" mainloop option, the DNS-SD advertisements still use the system hostname which is usually something like "hostname.local". Since Avahi doesn't include the loopback interface addresses in a local resolver request like mDNSResponder does on macOS, this leads to connectivity issues.
Update papplSystemAddListeners to force the pappl_system_t value for hostname to "localhost" when the listen address is "localhost".