external build: avoiding exceptions when creating URI objects