Fix error in calling diagnose_unused_labels

...it's not very nice when the pretty error report is replaced by a
stack trace