Interaction of threading and misfit dislocations in a strained epitaxial layer