Revert "[Loader] : Conversion to iterative algorithm."

This reverts commit 7ecf2968c14de8824925ca340e6dfffd446cca41.