As with all poisons, it's a question of concentration. Greed and nationalism are bad, in the same way that eating a kg of table salt is bad. That doesn't mean that salt in and of itself is bad.
Nationalism isn’t necessarily bad, it also has many good features [0]. Maybe that’s your point, but the first sentence doesn’t make it clear.