Fixed resolving closest nested object when sorting on a field inside nested object