When compiling JS code in the scope of a component, make sure to always
set the id object mapping, even if it is empty. Otherwise the id objects
from one scope might leak into another, leading to id object dependencies
that are invalid.