If he had really broken the law, would he have been righteous? No, he would not. You may certainly disagree.
There is a legitimate distinction between moral law, ‘laws of love’, and all the rest – ceremonial, dietary and civil.
Loving God means keeping his commandments, and his commandments are not burdensome.
1 John 5:3
He who is having my commands, and is keeping them, that one it is who is loving me, and he who is loving me shall be loved by my Father, and I will love him, and will manifest myself to him.
John 14:21 YLT