Fixes #5190: Correctly strips duplicate (type)/ from simplecache URL

Not sure if this needs to be limited to css/js or not...