Internalizing Externalities in Second-Best Tax Systems