All of the resources' `applyMemoryBarrier()` methods check if the second scope contains host operations. If they don't, they have no effect. If there are a lot of resources, iterating them for a method that will ultimately do nothing is wasteful. Bail out if we can see that they will do nothing.