Refactor away some of the mutable default argument handling.