I took a quick glance at your SO question now, it seemed too cryptic to me
After having my own issues with deferred, I modified a custom one for myself, I haven't been using the default deferred for years
At the time, the deferred lacked crucial features, especially with async operations, so I had to do this, 1-2 years later they added the features I requested
The deferred logic is EXTREMELY simple and elegant, you should just inspect the deferred library code and modify it or understand it to suit your needs, it's probably 60 lines or something