Fix emit of index assignments
Revert "Reduce unneded preprocessing"

This reverts commit 23e57bd9a3fba4e7465cc5f54dce2cc3907568b0.