I couldn't reproduce this bug, but it seems like in some circumstances ability refund can fail, making you loose ap.
Possibly happens if you are upgrading the last ability to t3, needs testing.
I had the same bug happen to me today. Match ID 13095135, I was playing Lash. At around 40:40 I die and then spend my 5 AP on the last level of Grapple, accidentally double clicked it back off and it removed the upgrade but didn't refund the 5 AP.