fix mutable default arg bug in safe_walk; fixup to #4751
Merge pull request #4793 from hulu/safe-walk-fix

fix mutable default arg bug in safe_walk; fixup to #4751