Fix NPEs caused by plugins accessing containers