Definition of internal objects on first valid reference encounter (fixes issue #26)