Fix for bug with json with multiple features

There was an looping index clash.