One of my colleagues had this issue today and we could not work out why the file would not detach. Apparently this is due to the XREF being in Paperspace and currently a forced detach of an XREF in paperspace is not possible. The XREF needs to found (QSELECT is your friend) and deleted prior to the detaching.