Re #6804. MSVC compiler warnings.

Reordering the headers leads to the suppression of warning C4251 getting
picked up from System.h via Algorithm.h
Merge branch 'feature/6804_warnings' into develop