Add nonce only once per page. Closes #521