in some cases, a target with the burning effect (From Pyromaniac or incendary bolt) but in complete darkness, is not burning enough to trigger Ambush feat, it seems like a bug.
The burning effect does make you think it will trigger it, but the lightening effect on the target's tile is not enough.
Sometimes it does, but is inconsistant (a distant source of light even dim, seems enough to able ambush).
I think that the bug occur when the burning target is in complete darkness (except the burning) AND is against a wall wich somewhat limit the light around it.