A note on the local-global principle for similarity of matrices