Determines if an object is in the parent or child context.