Improve simple api argument parsing in migration. Refs #6328

It now sees embedded lists, function calls etc properly.