fixes #3499 - uninitialized constant ResourceInstance