Master Marksman seems to not get applied in specific circumstances

By now I have seen multiple times that the Master Marksman perk does not apply when specific circumstances are met. It is supposed to add accuracy when no enemy is within ten tiles, and there is a little text indicating when this is true. Now, when there is one enemy closer than ten tiles it, of course, does not apply. However, when killing said enemy, the perk should come to bear, but it only seems to do so if the soldier also gets moved afterwards, or a new turn begins. Is this expected behaviour, or (as I suspect) is the check only applied on soldier movement and turn start, which can lead to this bug?

Corpses currently count for enemies in range.
It has to be a bug, can’t imagine it’s intentional

it is a known bug

Is it possible it is also affected by the faction of origin of soldiers? I moved my berzerker away and the sniper (recruited from a synedrion haven) suddenly got Master Marksman pop up over his head.