Revert "Revert "Avoid calling idmap w/ trailing whitespace [1/2]""

This reverts commit b4140c90d2d45a2ea195d64249783e4c98e2c6e8.