Fix crash for bag migration

This appears to be a copy and paste error. You should check the
rename rule order and not the last element of the list.
Merge pull request #239 from cmansley/groovy-devel

Fix crash for bag migration