recursively collect resources from includes