This one has a reasonably settled answer, so here it is. The shortage clause is the answer to the second question and it is a subtraction rather than an addition. Both exemptions forbid compounding something that is essentially a copy of a commercially available approved product. A product FDA has listed as in shortage is not treated as commercially available, so listing removed the objection that otherwise blocked compounding. It never created a permission; it withdrew a prohibition, which is why it evaporated the moment the supply fact changed.
If somebody has the primary source to hand I would rather cite it than paraphrase it.