The perils of being too conscientious!
Personally I make it a rule to ignore "received usage" if it's clearly wrong. For your purposes I'd agree with you that that means leaving it until after the quotes.
And, for what it's worth, I think The Rules around punctuation at the end of a quote only really applies to longer quotes, especially reported speech:
She swayed on the spot and gasped, "Lawks a mussy, I've come over all irregular, so I have."
The first thing she said was "lawks a mussy".
if that makes any sense......