update_layout() need to be invoked before checking if layout node is present, because layout not being updated might be the reason why layout node doesn't exist yet.