You can use addBack()
$('#search-form #QH-codes-label').prev().addBack()
Since id will be unique you can shorten it to
$('#QH-codes-label').prev().addBack()