In this article, using Kinetic Monte simulations on super-lattices, we study the evolution of extended defects during epitaxial growth. Specifically we show that, in the case of misoriented, close-packed substrates, a single-layer stacking fault can either extend throughout the entire epilayer (i.e. extended from the substrate up to the surface) or close in a dislocation loop depending on the deposition conditions and the crystallographic structure of the exposed surface containing the defect. We explain this behaviour in terms of a surface kinetic competition between the defect and the surrounding, perfect crystal: if the growth rate of the defect is higher compared to the growth rate of the surrounding crystal the defect will expand, otherwise it will close. This physical mechanism allows us to explain several experimental results of homo- and heteroepitaxy.