Fix bug in upwinding code.

Accidental usage of std::vector's operator< discovered.
Added assert to guard against wrong usage.