Fixed afterInsert, replaced extend with merge, added tiny test
1.6.1