The stability of coronal loops: Finite-length and pressure-profile limits