There's an off-by-one error in the config check / id generation for max.reserved.broker.id setting. The auto-generation will generate max.reserved.broker.id as the initial broker id as it's currently written.
Not sure what the consequences of this are if there's already a broker with that id as I didn't test that behavior.
This can return 0 + max.reserved.broker.id:
However, this does a <= check, which is inclusive of max.reserved.broker.id: