Made permission editor more robust to appearing multiple times in a page.