Avoid crash for relation with 'Any' targets [applied]