end_analysis now sets itself if not defined
merge resolved