Improve patching heuristics in assembly.sspace.embed()