allow control interface attrs at top level, and fix package name shadowed variable bug