Fix alignment auto-correction bug

Nasty bug destroying code. Turned out to exist in two cops. Reported in #515.