fix performance problem on 'new Object() {}' test code
(cherry picked from commit 3d634e4)[CR-IC-3799]