Fix when remote notifications are registered before user settings
For example, when you register the device for remote notifications to
enable silent pushes `content-available: 1` and later ask the user for
the push permission but this function incorrectly returns `denied`.