perform variable visibility checks in bytecode generator (all in one place)