add more tests and prevent double encoding when SCBs are merged