I have replaced the line with:
set curriculum_bar_p [util_memoize "llength [site_node::get_children -all -filters { package_key "curriculum" } -node_id $community_id]"]
Regards, Agustin