Bug fixes for test/apply.scm