Enable asserts when running tests
Begin compositing from the last replace operation

This avoid a bug where we were attempting to composite on top of an undefined
underlying value.