Miguels HPCC-10807 Rebased onto Gordon HPCC-10716

Your master is old which is why there is a long list of commits below - but look at the last two to see what I have done.