Fixed various crashes that could occur while sampling when Analyze while sampling is enabled. Fixed an issue where histogram views would show incorrect analysis while sampling.