code review: avoid prototype chains, fixed bad 1st-party test