This reverts commit 5c6d1ff2 and fixes that bug using the new reverse-map I added in the previous commit.