Merge pull request #8175 from jmcanterafonseca/bug_842268

Bug 842268 - Even if scripts are not fully loaded Lazy loader may incorr...(cherry picked from commit 91c265fc9b1442c67c3abc3e39497c292412a09c)