Husk, 7 bytes
Σפ=…Ṗ3
Makes good use of the …
range operator, which given a list of characters fills in all the missing characters to leave no gaps in the alphabet. For example:
…"CF"
=> "CDEF"
…"ADB"
=> "ABCDCB"
The key here is realising that a three-letters subsequence from the landscape will match the flag IFF the two are equal when …
is applied to both of them.
Explanation
Σפ=…Ṗ3Ṗ3 Get a list of all (ordered) 3-letter subsequences from the landscape× For each of these subsequences and each flag:¤=… check if they are equal when … is applied to both (returns 1 or 0)Σ Sum all the results