Fix #338 - make sure to invalidate WebGLObjects when they're deleted