Effect of long-range stresses on the structure of semiconductor heterosystems