Fixes and enhanced testing for resource policies including policies for related resources