If you build new ships are they still impacted? If not, disband them and then use the "create_unit" command to build replacements not impacted by the bug.

But are you sure you don't have a character on the ships? If the character has some sort of trait based unit penalty, that will effect the ships carrying him.