Object id polymorphic

Here is a repro for problems with find by object id as reported by many people.
how is id set here? it looks like it's undefined at this location