Bugfix in cases when the script isn't remote.

If the script does not have a src because is an inline script don't mark it as loaded.