fix #580 parent scope directives compiled twice