Fixes object insert, adds deep test case.