Fix invalid flags in lazy vals.
Better error message if position of tree isn't set.