upgraded from probably 51_pre2 to 51_pre4 /var/cache/edb/world now points to ../../../etc/portage/sets/world but the old contents of /var/cache/edb/world were not copied over to /etc/portage/sets/world; in fact that file was not created at all until the next emerge added a package.
/usr/lib/portage/bin/regenworld Make sure you're running the latest version.
See previous comment.