This is being done by framework builder. The framework builder tries to update any src paths and it assumes the base path is relative to the file it is located in.
Your work around is valid. I'll log this as a bug to see if we can update the code to better recognize this type of script and not update the path in this case.