Add support for visiting materialized relations