Fix problem with widget.getStateQualifier()

Fixed to take into account the recent change to read variables from the
parent widget: e60fc9f81f2c8f0d115543d8d330a1d68f9b890a