Well the code below only works for ReferrersCollection and the condition and the code where placed there in the same commit ... When you have an array or an ArrayCollection it simply fails since the method getOriginalPaths doesn't exist.