can't login on mapped domains when w3tc page cache enabled

My domain mapping is setup like this:

Admin Mapping: original domain

Login Mapping: original domain

Cross-domain: no (i’ve tried yes)

Everything works fine until I enabled w3tc page cache.

If I go to http://mappeddomain.com/wp-admin I get forwarded to:

UNMAPPEDDOMAIN/ORIGINALSLUG/wp-login.php?redirect_to=MAPPEDDOMAIN%2Fwp-admin%2F&reauth=1

That fails to login, and then I get sent to: UNMAPPEDDOMAIN/ORIGINALSLUG/wp-login.php?redirect_to=MAPPEDDOMAIN/ORIGINALSLUG%2Fwp-admin%2F&reauth=1

I don’t know for sure, but I believe the issue is that for some reason on these mapped domains there is a re-write rule such that I’m getting mappeddomain/originalslug/wp-admin Which obviously doesn’t exist.

I’m assuming that it’s an issue with the W3TC re-write rules and the domain mapping plugin. The re-write rules created automatically in htaccess are as follows:

# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(.*/)?w3tc_rewrite_test([0-9]+)/?$ $1?w3tc_rewrite_test=1 [L]
RewriteCond %{HTTPS} =on
RewriteRule .* - [E=W3TC_SSL:_ssl]
RewriteCond %{SERVER_PORT} =443
RewriteRule .* - [E=W3TC_SSL:_ssl]
RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
RewriteRule .* - [E=W3TC_PREVIEW:_preview]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =""
RewriteCond %{REQUEST_URI} /$
RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
RewriteCond %{HTTP_USER_AGENT} !(W3 Total Cache|iphone|android|ipad) [NC]
RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html" -f
RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html" [L]
</IfModule>