Just a minor simplification of how elements are removed. It doesn't noticeably change performance, but it saves a few gzip'd bytes, and it avoids a function that was only really used for that one thing.
Motivation and Context
It just cleans up the code some.
How Has This Been Tested?
Ran all the unit tests and perf tests to check for regressions in both. Performance changes appear statistically insignificant.
Types of changes