> The original code defined a struct with two bools that were not initialized. Therefore, when you instantiate one, the initial values of the two bools could be anything. In particular, they could be both true.
Then reading from that struct like in OP constitutes UB.
Then reading from that struct like in OP constitutes UB.