In 2.47 we introduced inlined flavors, which include extra_specs if so
authorized. The code was doing a policy check deep in the per-instance
handler that generated this blob. For queries with a lot of instances,
this policy check is a lot of overhead, especially as it introduces a
check of the policy file on disk, in case it has changed.
This patch makes us calculate the permission flag once per list operation
and pass it down to the lower layers to honor.
Closes-Bug: #1719966
Change-Id: I036623ae7409c2e6c6a754b4c8d5c9120f777774
(cherry picked from commit b1591d1080)