You are conflating non local and local government. Your town doesn't levy capital gains but your state or nation may.