The default onion port is -port + 1, computed in uint16_t. With -port=65535 it wrapped to 0, so the default onion listener bound to 127.0.0.1:0 (an ephemeral port nobody can reach) and the same port 0 was used for -bind=<addr>=onion without a port and as the onion service target.
Fail at startup with an error that asks for a lower -port or an explicit onion port instead. -bind=<addr>:<port>=onion with an explicit port keeps working.
feature_port.py gets a case for both paths; it fails on master (the node starts and binds port 0).
This patch was prepared with AI assistance (Claude) and reviewed and tested by me.