Put the /Resources reference directly into the underlying dictionary and handle null cases since /Resources is optional on a Form XObject.