The solution was to use powershell to upload a copy of the master file with the error fixed and a different file name, as changes to the master file in use are not allowed (as it cannot be deleted).
Step 1: Upload a master file with a new name. (note that the master file being used cannot be deleted)
WebURL = "http://XXX:100"
#Get the Web
$web = Get-SPWeb $WebURL
#Get the Target folder - Master page Gallery
$MasterPageList = $web.GetFolder("Master Page Gallery")
#Set the Target file for Master page
$TargetPath = $Web.Url + "/_catalogs/masterpage/afz_seattle.master"
#Get the Master page from local disk
$MasterPageFile = (Get-ChildItem $SourcePath).OpenRead()
#upload master page using powershell
$MasterPage = $MasterPageList.Files.Add($TargetPath,$MasterPageFile,$false)
Step 2: Once the new master file is uploaded with a different name change the templates to point to this file (Instead of the one with error).
$web = Get-SPWeb http://XXX:100
$web.CustomMasterUrl = "/_catalogs/masterpage/afz_seattle.master"
$web.MasterUrl = "/_catalogs/masterpage/afz_seattle.master"