[PPC] Factor vector removal into a function and remove O(n^2) behavior.