Adding a test case for order of precedence.

@bifodus, right now this test fails.