Fixes an issue where the IRI could be generated with a trailing ?# at the end, which results in resource not found errors on some feeds.