Fixed mutation bug in list processing / function calls