I've had this happen quite a number of times. Enough to conclude that it isn't based on the primary pet. I'm not sure if it ever has been. Perhaps there is a larger chance of getting a stone from the 1st type, but I've not seen sufficient evidence to confirm that.
I think that when a stone for the 1st pet type drops, it's easy to conclude that stone drops are based on the first pet. But there's a 1 in 3 chance that you will get either. And if you're up against a team with two flying, and one beast, odds are that you will still get a flying stone; but there's that smaller chance of getting a beast stone. In your case you had a one in three chance of getting either.
This is why when I level pets in wild battles I always do it by the striders. Most of the pets you will fight there will be aquatic, with a rather small chance of getting a flying stone. I would rather get all of one stone type because I can turn them in three at a time for a nameless stone, which I've already done several times with aquatic stones. And if I happen to get a flying stone? I still have 6 flying pets I need to upgrade, including my Snowy Owl.