When you kill a Guardian in a Greater Rift, the game checks the following locations…
Your hero’s inventory
Your hero’s equipment
Your follower’s equipment
Your Stash
If there are any legendary gems that do not appear in any of those four locations the game randomly picks one of the missing gems and that’s what gets dropped.
If the Guardian is not dropping a Bane of the Trapped, that means one exists in one of the four locations specified above. In which case…