fixed elem.focus() with related lookups, #411