Revert "Remove list_to_map conversion"

This reverts commit 29a514e75f2bcae517cb0442594dc69793e5f2b3.