Fix fact extraction from composite assumptions

This is a minor rewrite of 5b63c97 in #343 (from the top of long-running PRs).  See also #1961.