Remove dangerous usage of mutable default parameters.