Fixed rhmr copyObject logic to correctly detect recursive functions
some changes