Fix a bug in the Montgomery ladder

Thanks, @alex!

Refs #189.