Forward port of remaining CMSSW_7_2_X bits into CMSSW_7_3_X.

yeah... it should probably use `std::vector::empty()` as well..