We’ve been having this issue for quite a while now so I took it upon myself to investigate further. Nothing came out of browsing through the source code, so I installed xdebug to get a real stack trace out of this error. This isn’t related to wp_redirect at all, and has to do with an internal bug with W3TC somewhere.
Stack Trace:
Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0
Stack trace:
1. shutdown_action_hook() /__redacted__/wp-includes/load.php:0
2. do_action() /__redacted__/wp-includes/load.php:573
3. call_user_func_array:{/__redacted__/wp-includes/plugin.php:470}() /__redacted__/wp-includes/plugin.php:470
4. wp_ob_end_flush_all() /__redacted__/wp-includes/plugin.php:470
5. ob_end_flush() /__redacted__/wp-includes/functions.php:2935
6. W3_Plugin_TotalCache->ob_callback() /__redacted__/wp-includes/functions.php:2935
7. w3tc_do_ob_callbacks() /__redacted__/wp-content/plugins/w3-total-cache/lib/W3/Plugin/TotalCache.php:639
8. call_user_func:{/__redacted__/wp-content/plugins/w3-total-cache/inc/functions/plugin.php:23}() /__redacted__/wp-content/plugins/w3-total-cache/inc/functions/plugin.php:23
9. W3_PgCache->ob_callback() /__redacted__/wp-content/plugins/w3-total-cache/inc/functions/plugin.php:23
10. W3_PgCache->_can_cache_buffer() /__redacted__/wp-content/plugins/w3-total-cache/lib/W3/PgCache.php:337
11. W3_PgCache->_send_headers() /__redacted__/wp-content/plugins/w3-total-cache/lib/W3/PgCache.php:1547