Seems kinda clunky.  Shouldn't this be handled internally to replace_secret_params() since this is the only way it gets called?