HasTextureCoords and HasVertexColors are used as for-loop termination condition.
Example (JoinVerticesProcess.cpp):
for( unsigned int a = 0; pMesh->HasTextureCoords(a); a++)
This works until a mesh has an empty uv slot. If a mesh has uv channel 0 and 2, the previous loop will terminate on index 1.
The right code should be:
for( unsigned int a = 0; AI_MAX_NUMBER_OF_TEXTURECOORDS; a++)
if (pMesh->HasTextureCoords(a))
This may not be fully clear in the docs, but the intention is that there are no gaps in the channels - importers are simply not allowed to do this.
A gap inside channels may happen (due to artists material configuration) and is perfectly legal state that is correctly exported into FBXs and DAEs. Removing gaps (as ColladaLoader.cpp does) without logging an error will lead to a loaded asset different from the one stored in file.