A loophole benefiting the carmaker Tesla has ended in Washington state after a compromise between other electric car manufacturers and local auto dealers.