Fix cling teardown issues when a pch is attached. Kudos to Axel.