In order to acquire a different firearm (including moderators) one needs an 'Authority to Acquire' otherwise known as a 'slot'.
One would need to notify disposal of the (in this case defective) firearm and apply for a 1 for 1 variation, at no cost.
If the firearms unit is helpful and pragmatic, they can take the old firearm off, authorise acquisition of a replacement and fill it with the details of the new replacement firearm, show it as possessed and issue a replacement firearms certificate, job done. Such action short-circuits the whole, otherwise drawn out, process and everyone is happy. To comply with the letter of the law, they should have received a 1 for 1 variation application though.
In other words change the serial number as Edinburgh Rifles suggests. Having said all that, if you are dealing by post or someone is sticking strictly to the law, one must do a 1 for 1 variation application.
Anyone who tells you that you can simply 'swap' a firearm, without an 'authority to acquire' is mistaken and such actions, no matter how unwitting, have caused several people grief, when their error comes to light.