This mostly follows the plan detailed by the discussion
Simon and I had, with one difference: instead of grabbing
the free variables of the trivial expressions to get the
embedded Ids, we just use getIdFromTrivialExpr to extract
out the Id. Because we only ever inline trivial expressions,
and there is never a literal in the function position,
we satisfy the invariant for this function.
Signed-off-by: Edward Z. Yang <firstname.lastname@example.org>