rewrite inheritance of contexts feature to spec