Modified to check if relation is in exclude list so we don't have to query every single relation for a DO