Don't replace (and log) the same resource entry

Resources may be registered multiple times. This
ensures that logs are only emitted the first time
a resource is registered.

Change-Id: Iedd12d55007ee24ea6ecbe4fe7152ff65ea665b0
Merge "Don't replace (and log) the same resource entry"