Fix right precedent tests

This is an improved version of #56.