Fix findElement logic
Replace peek with visit and get

The visit function is cleaner and a VariantException is better than an
assert at runtime.