diff --git a/lib/AssetGraph.js b/lib/AssetGraph.js
index <HASH>..<HASH> 100644
--- a/lib/AssetGraph.js
+++ b/lib/AssetGraph.js
@@ -288,8 +288,8 @@ AssetGraph.prototype = {
             if (this.getBaseAssetForRelation(affectedRelation) === asset) {
                 if (affectedRelation.to.url) {
                     affectedRelation._setRawUrlString(fileUtils.buildRelativeUrl(asset.url, affectedRelation.to.url));
+                    this.markAssetDirty(affectedRelation.from);
                 }
-                this.markAssetDirty(asset);
             }
         }, this);
         this.findRelations({to: asset}).forEach(function (incomingRelation) {
diff --git a/lib/relations/HTMLScript.js b/lib/relations/HTMLScript.js
index <HASH>..<HASH> 100644
--- a/lib/relations/HTMLScript.js
+++ b/lib/relations/HTMLScript.js
@@ -12,7 +12,7 @@ util.inherits(HTMLScript, Base);
 
 _.extend(HTMLScript.prototype, {
     _getRawUrlString: function () {
-        return this.node.getAttribute('src', url) || undefined;
+        return this.node.getAttribute('src') || undefined;
     },
 
     _setRawUrlString: function (url) {
AssetGraph.setAssetUrl: Marked the wrong asset dirty.