Fix intermittent errors for redirect

Add assertion of header before checking URL redirect

Fixes: https://www.pivotaltracker.com/story/show/49712465