Fix shifting_and_reflecting_functions

I have no idea how this was working before, it seems to me like it would
have forced regeneration before and frozen things...

Auditors: alpert