On the shape memory effect in internally faulted martensites