compiler: don't crash when objects aren't assigned layers