I spent so many hours trying to make this work, I'm so glad I finally managed to do it! The idea that saved me was wanding in the end (arm 13), without that finding a space for the gold output was a real pain.