Code cleanup for ActionDispatch::Flash#call

Here I include a fix for the broken specs in railties as reported here
https://github.com/rails/rails/pull/10580#issuecomment-17788152