Improved doc_to_imagefield test