Properly fix infinite immediate block update stack overflow

Signed-off-by: Ross Allan <rallanpcl@gmail.com>