Issue #2378669 by djdevin, carlospdl: fixed and added tests for critical issue with categorized random questions not building question layouts properly