avoid Array#find in Puppet::Resource::Catalog::Puppetdb#find_resource