Asm.js: as mentioned by @mishoo `has_directive` looks into the parent scope too