It seems to me that duty has more to do with collectivist feeling in general than nationalist feeling specifically (which is just one subtype of collectivist feeling). You have duty if you belong to and care about something larger than yourself. I think what's weakened people's sense of duty is the wave after wave of increasing individualism that probably accelerated some time after WWII, and has been going on for as long as I've been alive. A big part of duty is sacrificing your individual interests for another, which has always been hard but is even harder if social attitudes don't give it much support.