This happened to me too! When I bought this house last October, I originally got beat by a lower offer, but their bank didn't approve their mortgage loan because they messed up the paperwork so it fell through.
Turned out it was someone else from the same realtor as the selling agent, and they were trying to keep it in-house and buy it on the cheap to flip it.
But more importantly - Congrats!