Rewrite errors when validating Yale container hierarchies