In the US, you can offset the gain, if the loss happens in the same year. If it happens later, then you're supposed to have paid the taxes in the year with the gain. The later loss can be used to offset gains after that.
It seems to be similar in New Zealand, where the article says that (like the US) there's tax due when you exchange one token for another without going out to fiat. A lot of investors didn't realize that and didn't pay their tax in that first year, and then didn't have the money later when the government came collecting.