It was sometimes done by repair arsenals if the old number was illegible or suspected to have been altered. In my years I have only seen one such gun, and the old number had been completely ground off and the new number stamped over it.
X-Numbers where assigned to pistols with missing or defaced sserial numbers. First numbers where assigned in august of 1922 to replace serial numbers on stoleen pistols that had their numbers removed or defaced by the bad guys. Arsenals would stock pile the dameged guns till they had a certain amount and then ship them to springfield armory. The also did this to pistols whose numbers would become unreadable after a refinsh. Manila and augusta arsenal also did the renumbers.
The number you mention was done in either Springfield or Augusta as x1187-4385 where said to be assinged to those two.
numbering was said to have stopped around 1953.
Resources that refer to this are clawsons book and harrisons book.