fix: avoid double-calling a derived reference when destructuring (#18668)