Fix create_index

After creating the index, it's good to wait until it's created before
moving on. This worked before because the code did other things and
that allowed it to work, but we should make it explicit.
[Bug 845773] Kill Highcharts.