This isn't actually an issue any more because we return early when the location is invalid, but we shouldn't be attempting to add a reference to a label that wasn't actually written in the first place.