Since you come here probably looking for an answer, let me give it first. After that, if you have time, I'll explain why it turned out to be that sort of hack, i.e. what other approaches didn't work.