test cases:

test results ("O" means passed, "X" means failed):
O, archer can't fire inside wagon
O, archer can't fire inside mantlet inside wagon
O, archer can't fire inside ger tergen cart
O, archer can't fire inside ram
O, archer can fire inside siege tower
X, archer can fire inside wagon inside TC
X, archer can fire inside mantlet inside wagon TC
X, archer can fire inside ger tergen cart inside TC
X, archer can fire inside ram inside TC
O, archer can't fire inside barcha longa
X, archer can fire inside barcha longa inside TC
O, archer can't fire inside wagon "inside" bridge
O, archer can't fire inside mantlet inside wagon "inside" bridge
O, ...ger tergen cart can't even step on bridge lol
O, archer can't fire inside ram "inside" bridge
O, archer can fire inside siege tower "inside" bridge
O, archer can't fire inside transport ship
O, archer can't fire inside wagon inside transport ship
O, archer can't fire inside mantlet inside wagon inside transport ship
O, archer can't fire inside ram inside transport ship
O, archer can fire inside war caravel
X, archer can fire inside transport ship inside TC
X, archer can fire inside wagon inside transport ship inside TC
X, archer can fire inside mantlet inside wagon inside transport ship inside TC
X, archer can fire inside ram inside transport ship inside TC
O? archer can fire inside war galleon inside TC, probably fine, since both allow carried units to attack?
O, archer can't fire inside wagon inside nordic hall
O, archer can't fire inside mantlet inside wagon inside nordic hall
O, archer can't fire inside ger tergen cart inside nordic hall
O, archer can't fire inside ram inside nordic hall
O, archer can't fire inside transport ship inside nordic hall
O, archer can't fire inside wagon inside transport ship inside nordic hall
O, archer can't fire inside mantlet inside wagon inside transport ship inside nordic hall
O, archer can't fire inside ram inside transport ship inside nordic hall
O, archer can't fire inside barcha longa inside nordic hall
O, archer can't fire inside war caravel inside nordic hall
X, archer can fire inside wagon inside guard tower
X, archer can fire inside mantlet inside wagon inside guard tower
X, archer can fire inside ger tergen cart inside guard tower
X, archer can fire inside ram inside guard tower
Conclusion: the check was probably changed from "unit can attack if immediate garrison allows" to "unit can attack if first garrison in stack allows", resulting in this new bug.
Possible solution: change the check to "unit can attack if all garrisons in stack allow"