Investors often think of municipal bonds, which are sold by local and state governments to fund public projects like building new schools and repairing city sewer systems, as being totally tax-free—but that’s not always the case.