Compile fixes; extract list transformation logic.
Fix reordering of ll_{smartptr_,}list template args.