Though one may feel a personal obligation out of enculturated habits and personal preferences it is not anything more than an individual preference or habit of thinking.
since the group shaped/shapes the individual, and the group, by-and-large, is also part of the reason the individual can survive and thrive, the person should feel a sense of duty to the established group.
I am not sure which is more accurate, I think there are good arguments for each view.
The second view reminds me of Plato's lines in his Crito when Socrates considers Crito's escape plan and Socrates explains that he has a moral obligation to remain 51:
And he who disobeys us[the law] is, as we maintain, thrice wrong: first, because in disobeying us he is disobeying his parents; secondly, because we are the authors of his education; thirdly, because he has made an agreement with us that he will duly obey our commands; and he neither obeys them nor convinces us that our commands are wrong; and we do not rudely impose them, but give him the alternative of obeying or convincing us; that is what we offer and he does neither.
Note that, it is not so easy to leave one's country today, but people can and do leave.
In disobeying the law he is disobeying his parents. The word patriotism, 'of one's fathers' suggests that one ought to love the laws of the land as one loves one's parents.
The law of the land teach us how to act or not act, they educate us, we know most of what we know because of the practices of the place where we are raised.
Our implicit contract exists because we live under the safety, protection and economy of our country. As initially stated it is possible to leave.
Now working into your 1st possibility no being swayed by patriotism ( nationalism seems to be more of an aggressive, racial term).
A moral man might look at the bombing of Aleppo and object that Assad's grip of power, his allowance of the death and destruction of the multitudes of his citizens as well as those nations who have realized his terror is incandescently immoral. The vast migrations of people out of the country suggest that any notion of an implicit contract here is inane, that the only education the country is providing is how to kill as many enemies of the state as possible.
We owe nothing to the state, we owe everything to the universal value of human life.