fixed bug in contains_backrefs