Earlier this year, the leaders of the world’s largest stock indexes found themselves in a pickle. SpaceX, Elon Musk’s rocket maker, had told them that it planned an initial public offering in the summer. The company said it wanted to be included in the top indexes — which are composed of a variety of public companies and act as a barometer of the broader stock market — shortly after going public, two people familiar with the process said. It was a big ask.