Apparently using setImmediate with Firebase is fraught with peril