Simplify code a bit.

Turns out, variant passed to boost::apply_visitor mustn't be non-const. It just can't be lvalue.
Such template magic, wow.