Haven't found a solution, but, the cause is the DOCMD(1312) reacts to the active shape, not to the shape containing the command. In your scenario, the Master level shape is selected, so it's the active shape. You push into the appropriate subshape and call DOCMD(1312) from there. Unfortunately, the subshape is not the active shape.
DOCMD didn't accept format sheet.xyz!DOCMD(1312). So, it's not pass-able. Yuk.
Somehow, you need to select / activate the subshape first.