Fix state leak.

Follow up to https://github.com/rails/rails/pull/15061#issuecomment-45101569