Merge "Validate that pointer index is valid before accessing attributes." into main