I solved it, yet even though I solved the issues, I can't explain why this was necessary or what my prior method was doing wrong.
Lua Code:
-- Process subzones
if db.watchSubZones then
-- Battlegrounds and warfronts are the only instances with subzones
if inInstance and instanceType ~= "pvp" then return end
-- Don't loop through subzones if the player is watching a bodyguard rep
if isWoDZone and bodyguardRepID then
watchedFactionID = bodyguardRepID
else
-- Get our subzone data
watchedFactionID = CitySubZonesAndFactions[subZone] or subZonesAndFactions[subZone]
end
end
-- Get world zone data or the character's default watched faction. For some unknown reason, watchedFactionID loses data from bodyguards and instances at this stage in the code, refresh
if watchedFactionID == nil then
if isWoDZone and bodyguardRepID then
watchedFactionID = bodyguardRepID
elseif inInstance and hasDungeonTabard then
watchedFactionID = tabardID
elseif inInstance then
watchedFactionID = instancesAndFactions[whichInstanceID] or db.defaultRepID
else
watchedFactionID = zonesAndFactions[uiMapID] or db.defaultRepID
end
end