I knew about this problem. That's why I didn't add google.com into database because otherwise it could override google subdomains like docs.google.com, picasaweb.google.com etc.
Some hours ago (before this bug was posted) I've found the best solution for it - both optimal by performance and by implementation (using tree-like logo index). Probably I'll start implementation tomorrow.