Fix NPE when adding a permission without a registrant (issue-344)

Change-Id: Id6bf070a43072a61a0034bd2d971fc819c9b03e3