Fixed #22023 -- .values() followed by defer() or only() results invalid data or crash

Please review