#162 fixed problem with code that adds extra permission records as part of the nightly service.