This is intended.
If the target dies within 5 seconds you get the original Ember cost refunded, if the target is actually killed BY THAT SHADOWBURN, you get a second bonus Ember in addition to the refunded original ember.
Glyph of Soul Consumption has an internal Cooldown of like 10 or 15 seconds, this puts it on par will similar self-heals-for-kills like Victory Rush and or Dark Succor, which can only heal if used immediately after a kill on a new target.