It isn't considered hedging because it does not keep two positions open, but just closes the first position. It would be indeed hedging on a non US account where a new position would be opened in that case.

I have to agree that it's bizarre. Normally a broker should take care of this in his API, and not leave it to his clients to solve the problem. I have indeed not seen this issue with other broker's APIs so far, except for FIX APIs where it also appears. Anyway, as a software developer you're used to work around all sorts of bizarre stuff all the time, so we'll take care of that in the next-but-one update.