Bug 875276 - Improve robustness when optimizing .length accesses on objects, r=jandem.