Can we use the same "sort resources by depth" trick here too?