TS-2019 Fix the "vector inconsistency" errors.

(cherry picked from commit af3e7aa871740e85b0e610b3fd4c2dd741bfe52a)

Conflicts:
	CHANGES
TS-2607: Fix TS_USE_HWLOC #define in build process

(cherry picked from commit 3b3461edf835719e24d9cf2b2c74969d9a8ee012)

Conflicts:
	CHANGES