fix(library/unifier): make sure the imitation step is type correct, fix ensure_sufficient_args

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(library/unifier): make sure the imitation step is type correct, fix ensure_sufficient_args