This functionality should check the columns covered by the two indexes using equals() method instead of using operator ==, which checks the object references.
I encountered this issue, while writing a test case for serializing QueryPlanDesc (issue #309 ).