Add more tests around lists of embedded documents and dereferencing embedded documents, plus fix a few bugs relating to those.