Origin of the metamagnetic transitions in Y1−Er Fe2(H,D)4.2 compounds