Fixes: #5376, errbacks called before accessing nonexistent objects