Make references to native arrays work properly in code generated from scan.