Implement the XTARGET feature for PR1778