Add tests for safe unfolding of blocks
Remove unused param in unfoldSafely