Added isUsed() check for diagnosis reference.