This needs to handle the first iteration differently than the remaining iterations.  For the first iteration, this behavior is correct.  For the remaining iterations, it needs to use the last *key* that it saw, not a token.  So essentially, it will be using {{start_key}} and {{end_token}}.