Fixed wrong detection in a nested repository structure.