Fix crash when partialtrapping a Substitute