The closed flag isn't a good design by any means, but let's have this working first before I get rid of the flag and potentially create a non-backportable commit. (cherry picked from commit 957bf15a08)
957bf15a08