Why Nationalism and Patriotism seem like it swap meaning?

Webster's 1913 Dictionary has this as one of its definitions for nationalism:

  1. The policy of advocating the interests of one's own country exclusively, regardless of effects of a country's actions on other countries.

This sense of the word carries a more negative connotation than patriotism. Often in political discourse, the word nationalism is used in this negative sense, while people tend to use patriotism to talk about the more positive aspects of dedication to one's country.