Not a bug. When you sell a part that has existed since the ship was in combat or made an FTL jump, you only get 75% of its original cost back. But then that gives you a 25% discount on the next part of the same type that you buy, thus making it so that you can move a part at no net cost. An armor wedge costs 150, and 150 - 25% = 112.