Don't attempt to do reflection on invalid resource pointers. Fixes #3966