Merge "Fixes NPE thrown in sort if new targets are added." into oc-mr1-dev