Fixed events not being triggered for objects inside arrays.
Added test.