fix bug in replce-type-var. tests/srfi-1.scm now passes