Revert "Corrected mapping nesting logic"

This reverts commit af662c614f14e793b33af64e934a412893bee1d1.
Catching and rethrowing exceptions, so that mapping nesting level can be reset