Merge "Make sure to check write perms after rewriting destination table" into jb-mr1-dev