We apply the model relating halo concentration to formation history proposed by Ludlow et al. to merger trees generated using an algorithm based on excursion set theory. We find that while the model correctly predicts the median relation between halo concentration and mass, it underpredicts the scatter in concentration at fixed mass. Since the same model applied to N-body merger trees predicts the correct scatter, we postulate that the missing scatter is due to the lack of any environmental dependence in merger trees derived from excursion set theory. We show that a simple modification to the merger tree construction algorithm, which makes merger rates dependent on environment, can increase the scatter by the required amount, and simultaneously provide a qualitatively correct correlation between environment and formation epoch in the excursion set merger trees.