Fix 2802 (reduces publish queries)

fixes #2802