Fix interpretation of false as param to doc.canonicalize

The documentation of canonicalize claims to default to false, but if called with false, it is interpreted as true.