In the case of multiclass classification, the calculation of AucRoc should require that the class in question appears in all documents top classes arrays, so that we know its probability for every document.
Otherwise, the results are not correct or, in some cases, as pointed out by @wwang500, the evaluation request fails because it cannot find even one single document with the class in question listed in top classes.
The solution is to set num_top_classes so that it is greater or equal to the total number of classes. We should minimize the surprise for the users though and possibly apply a sensible default ourselves.