Recent experiments on two iron-pnictide families suggest the existence of a single quantum phase transition inside the superconducting dome despite the fact that two separate transition lines - magnetic and nematic - cross the superconducting dome at Tc. Here we argue that these two observations are actually consistent. We show, using a microscopic model, that each order coexists with superconductivity for a wide range of parameters, and both transition lines continue into the superconducting dome below Tc. However, at some Tmerge<Tc, the two transitions merge and continue down to T=0 as a single simultaneous first-order nematic-magnetic transition. We show that superconductivity has a profound effect on the character of this first-order transition, rendering it weakly first order and allowing strong fluctuations to exist near the quantum phase transition.