Correct sourcemap check for existing index