Remove inconsistent template spaces.