Sure -- democracy is no guarantee. Referendums go wrong. Aaaand we're back to the Enlightenment political question of how best to balance the will of the masses (which can become a mob in the right circumstances, or an instrument of oppression to the minority) against the wisdom of representative government -- a republic. A sticky wicket indeed. The idealism here -- and I freely admit that it is based on a naive Modern optimism -- is that a transparent, representative democracy, rather than a direct democracy, corrupts more slowly over time and retains the highest possibility of self-reform of all types of governments.
We can leave aside the argument whether it's correct in this assessment (tangential here). Either way - it's not a case of majority deciding to oppress a minority (who are both parts of the same country), but rather issue of how a country should deal with the external world.
However - assuming a hypothetical - that US held a referendum (like they do in Switzerland) and majority of population voted for NSA surveillance / Guantanomo / drone strikes (ie all the issues that make most on HN viscerally uncomfortable). What then - can we still decry the fall of democracy?