Sounds like the gate agent didn't realize you'd rechecked and received your boarding pass at the AC, and gave your seat to the next person on the list. If your upgrade had cleared in advance, it probably wouldn't have been necessary to get to the gate at T-45 or T-30.
It's interesting that we're seeing multiple reports of this happening lately, though:
http://www.flyertalk.com/forum/ameri...e-counter.html