Idiom: Spoil the ship for a ha'pworth of tar

What does 'Spoil the ship for a ha'pworth of tar' mean?

If someone spoils the ship for a ha'pworth (halfpenny's worth) of tar, they spoil something completely by trying to make a small economy.

See also: