To escape her bonds, Amy turns herself into a rat, but then, being a rat, she is unable to remove her own spell.
Amy turns herself into a rat. This is to escape her bonds. She is being a rat. This is then. She is unable to remove her own spell. This is then.