Fixed nested documents and arrays in the BSON builder.

Yes, this actually never worked.