Follow-up fix for bug#5852 - improved queue name recognition.