Race Entry Limits

I just had a question out of pure curiosity.

In most Races, each stable is limited to 3 entries. What would happen in the following scenario?

Stable A has a horse, Leased Horse, that they have Leased from Stable B and has entered that horse in a (for arguments sake) Stakes Race. At the same time, Stable B wants to enter 3 horses in the same race. Would they be able to enter all 3?

I know that in the Post Parade, Leased Horse would show up as owned by Stable B and Stable A would only be able to enter a maximum of 2 non-leased horses for that race. Presumably, Stable B would still be able to enter 3 horses in the race (even though the Post Parade would show that they had 4 horses in the race).

I’m pretty sure the code counts your limit based on horses you are actively leasing, or horses that you own that aren’t leased out. So in that scenario Stable A could enter leased horse + 2 others, stable B would be able to enter 3 other horses.

(I think it’s just the post parade that doesn’t reflect the leaser on display.)