MDL-36841 portfolio: ensure variables in parent function match those of childs to...