Yep, they got away with one. But would you prefer they lost just to teach them a lesson? As you said, they know they were fortunate. It's better to win and have things to work on than lose and have things to work on.
And for the record I was very annoyed for most of the 2nd half with how we couldn't put them away...BUT, they DID win and that's what matters.