better handling for invalid `url` stanzas

fixes #6960