TS-2705 Make the background fill check more robust.