The logic introduced in #672 could stand to be a bit more defensive -- a tuple comparison or something similar would be great.