I agree that the UNS described is a live-ball foul so for "A" to keep the ball this penalty will be declined and the leverage foul accepted. Now think practically... Team B just returned this ball the length of the field for a TD... there won't be an official within 20 yards of this score nor a defender which is why the UNS foul occurs. The "when in doubt" comes in because you're not parked on the goal line. So if you know the call you make the call. If you have doubt because mechanically your not in position then we go dead ball foul. If you can get to the goal line with or before the player scoring, you should be playing the game, not officiating it.
All that said, if you go two live ball fouls (one accepted, one declined), Team A isn't going to be complaining getting the ball back for a first & goal.