Refactored the mega gross processIncludedResources().