Fix #799 "XPath error when hiding section"

Issue was that `mapValues` is a view.