[BZ-971001] [BZ-971008] Fix grouped accessors using '&&' and '||', optimize inline casts and nullsafe references