Fix layout of derivative tree