Correctly complete redirections. Fixes #1296