Due to public ID assignment, gaps in resource type and entry
IDs can occur. This can lead to null pointer dereferencing
if not careful. This happened in ResourceTable::getDensityVaryingResources()
which is called when building Splits.
Bug:30879690
Change-Id: I588e4dcd2e042fccfcb2e87967b5cbd0d23b4497
(cherry picked from commit 081d1b4cf602fdd7302b597e6bf902cb415bc3a8)