Fix scene lookup, add some assertions