[FIX,DOC] Fixing const-correctness and dox of calculateMateIndices().