Bug fixes in discardNlTk

* Has been around since time immemorial.
* Surprised this never crashed before
  - since returning null would have inserted a null into a buffer.
  - without incrementing i in the loop, we would inserted undefined
    into another buffer.

Change-Id: I69171e037d830ff9515eb1c5c84a2a9a6fda3e87