Fix bug where assigning an array property did not work. Add test for same.