Such case can happen when an external definition is malformed.
Previously, the parsed malformed external was added to the directory state
with an empty external URL which could lead to unexpected side effects like
removing all previously exported valid externals.
Depends on D8941