SessionSource in session_rules.route_entries gains shared_session, written by to_dict only when set and read back by from_dict, and build_session_key keys a source with the flag on the chat's shared session even when it carries a sender id, as gateway.session does since main's Telegram observe-mode change. The copy is again main's SessionSource, and its build_session_key differs from main's only by the WhatsApp mapping it does not read.
New cases pin the round trip and the shared group key against main's own builder.