LIMS-1330: handle duplicate of reference analysis
LIMS-1087: Prevent listing of empty categories