Add flags checking as a debug thing