Overriding equals() in our Prinicpal class helped! Thanks jaikiran.
Thanks for confirming that. I'm closing this as "not a bug".
Thanks for confirming that. I'm closing this as "not a bug".