I had this problem yesterday. I wanted to trade in my viper back in for a hauler. The only way I could resolve it was to self destroy my viper and take the standard sidewinder, loosing about 50k cr in the process and build back up from there. This is a bug that needs urgent looking into because having to loose such a big amount of cash, not to mention the time accumilating it, to swap back to a lower class of ship via self-destruct is a big nono.