Remember that the current capacity of a wire is determined by both the gauge and the length
No it's not. Current capacity of a wire is determined by it's cross sectional area and the material the wire is made of. Heat dissipation may be limited by insulation and conduit so that derates the current capacity.
Length has nothing to do with it. Length has effect on Power delivery and voltage drop, not current capacity.
Actually, both have an effect, although not necessarily as you expect. [To establish my bona fides here, I used to blow wires up for a living, and the physics of melting and exploding wires is actually fairly complex]
Fusing current (which is sort of the upper bound for what you're talking about) is approximated by using a formula that includes diameter, resistivity, melting point and time. There's an assumption in that formula about heat transfer to the surroundings, and that's where the physical shape/length starts to have an effect. The time factor has to do with getting the heat to the surroundings, by conduction to still air is the usual assumption. That is, the formula assumes an infinitely long wire in still air.
(By the way, the NEC thermally based ampacity limits are based on the same sorts of assumptions: 100% duty cycle, still air, very long wire)
This also assumes that electromagnetic forces aren't relevant (no kiloamp lightning strokes, for instance).
In any case, fusing current for AWG16 copper wire at "room temperature" for a 5 second current pulse is 123 Amps (Onderdonk formula).. that's for a wire with less than half the cross section of your AWG12 example, and to a first order you can scale with area: about 250A fusing current. That's a lot more than the 50 Amps. But remember that's the "infinitely long conductor in free air".
Length starts to get involved too, because for a lot of circuits (e.g. the leads on components and most circuit interconnects whether PC board traces or hookup wire), the primary heat path is conduction *along the length of the wire* (because air is actually a good insulator). So a short wire will fuse at a higher current than a long wire, because the "ends" of the wire are usually near something that serves as a heat sink.
Copper is about 16000 times better at conducting heat than air, so this length effect is pretty strong. It has to be a pretty long skinny wire before the fusing current is as low as the one from the formula.
And this applies for just looking at heating in an insulated wire too, by the way. A lot of times, it doesn't matter if the wire is insulated or not, because the thermal path to the end is SO much lower resistance than out through the side.
So, you're both sort of right, and both sort of wrong.
And what people do is use empiricism. They put in a wire that is probably big enough, and test it, and if it works, call it done. The wire is often a LOT smaller than you'd expect. (because, after all, material is money)
Another trap is when someone blindly replaces the wire, not realizing that it has some secondary function. (deliberately small fusible links in auto wiring, for instance)