ensure late updating of CSP (bug 1051784)
Merge pull request #2499 from andymckay/1051784

late updating of CSP