Use DFHack to check if the artifact has the Hidden flag set (I think this flag is accessible from the Stocks menu when set under normal circumstances) and whether it has the Trader flag set. The latter flag is often set on artifacts dropped by visitors slaughtered by invaders, and while it's set it's impossible to move.
Hmm, now we're getting somewhere. Trying to get the hang of the new toy.
I just found something interesting. Position XYZ of the artifact is nowhere near the Villian's XXTroll fur sockXX.
Update. Kinda what I suspected there. Checked via N menu, X Y values correspond to what gm-editor position shows. Z is wonky, Z value from editor is 22, value from N is -17 .
Artifact's Z value is 65 I think it got placed 20 Z levels below the eerie pits. ( Gauntlet) other one also got scattered somewhere else, random X Y Z value compared to artifact, which is also below Eerie pits.
Still counted as in inventory of something. Hidden tag is false, foreign is false. Messing with XYZ values resulted in artifacts disappearing from stocks menu.
Here I was thinking PLAYING the damn game was hard.
Okay, so far what I have been able to do.
I have managed to move them to the normal terrain. For the first artifact, I went by intuition ( lol ) on the Gm menu. It resulted in a "Ghost artifact", Ie I can see it, I can't select it on map, or check the menus via loo(k).
Dwarves had NO problem whatsoever to haul it and put it on a pedestal. Half success.
Second one, ran my actual fort on parelel. Dropped an artifact on the floor, went piece by piece, set all the values to the artifact I'm trying to move. ( I noticed temperature dependant data was all set automatically to 0 when I checked the bugged artifact with gm-edit, oh well, I'm not messing with temp data, I don't want to mess anything up, you see where I'm going with this ? )
The second I unpaused the game, second artifact transformed in pink smoke lol. I'm assuming, I HAVE managed to make it interactable/selectable/ useable, then temperature interaction hit and since it was set to vaporise at 0 urists well...
I'll update my bug report, change artifact bugged to " Transports to random X Y location several layers below eerie pits with temperature data cleared "