Lawful Good alignment

I saw one of those "Fill out our survey and see what D&D alignment you are!" things on Facebook, and it got me thinking.
If a character is "lawful - x" does it depend on what laws the character bases their life on?

Say they live in a place where it is illegal to brush your hair with your left hand, but they say natural law says they own their own person and that supersedes the state law, do they ignore the "illegal" state law?

Or if the state contradicts itself in creating a law that says people have to work everyday, but a higher law says people can't work on Mondays, do they ignore the work everyday law? What if the state does not enforce the no work on Monday law, but does enforce the work everyday law? Do they base their behavior on what the state enforces?

The alignments thing in D&D was always somewhat problematic.

I believe Gygax explained the lawful/chaotic split on to what degree the character had for laws/society to further the end of good/evil, or in the case of a lawful/chaotic neutral, laws and chaos being ends in of themselves or to further some other end which did not really have a good/evil label.

A chaotic good character, would have no problem working outside the law in order to further the cause of good. An example would be superhero vigilantes.

A lawful good character, on the other hand, would attempt to work within the law. If not possible, they would probably work to change the law. Modern examples would be someone like a benevolent political leader.

A lawful neutral character, would use the law to further ends not necessarily fitting a good/evil dichtomy. Greed/personal advancement being a common motiviation. A modern example would be something like a corporate lawyer.

A lawful evil character, would intentionally work to enforce and/or change laws to advance evil purposes. Modern examples would be people like Nazis.