On Ezekiel’s “Laws that were not good”

Therefore I also gave them statutes that were not good, and judgments, in which they shall not live.  And I polluted them in their own gifts, when they offered all that opened the womb, for their offences: and they shall know that I am the Lord. Ezekiel 20:25-26

How could, or in what manner, did God give Israel such laws? Are not all of His laws good?