The number of libraries should be the same as the number of uri's, so you could explicitly test for it.