Issue #3117291 by NitinLama, smustgrave, silverham, Chi: Element::isEmpty() should check for #weight property (cherry picked from commit c3f6ce5c)