I would try inserting the following at line 12:
Lua Code:
local function initCommon(frame) -- old line 11
if (BackdropTemplateMixin) then
Mixin(frame, BackdropTemplateMixin)
end
frame:SetBackdrop(backdrop) -- old line 12
After quickly scanning the code, my assumption is that every frame with a backdrop has this initCommon function called once only before any backdrop functions are used.