Context in sorting order Closes #3909