Forward port of invalidation changes from zenoss-4.x