fix arrayput bug that stored references with incorrect level of indirection