[#4226] Fix null resource/privilege assignment

- Prepend `null` to the list of resources when `null` is passed as the
  resource to `allow()`/`deny()`, ensuring that `allPrivileges` gets
  updated correctly.