Improve recursion issue that can possibly occurs with fixes for #1443