Origin and consequences of a high stacking fault density in epitaxial ZnO layers