Q:

Property binding updates an event frame later

I have a C++ object exposed to QML as myObject.  This C++ object has a Q_PROPERTY:
Q_PROPERTY (bool myProperty READ getMyPropert NOTIFY myPropertyChanged)
In QML I use this as a guard in a SignalTransition as follows:
property bool foo: myObject.myProperty

SignalTransition {
   targetState: someState
   signal: someSignal
   onTriggered: console.info("foo: " + foo)
   onTriggered: console.info("myObject.myProperty: " + myObject.myProperty)
}

The output is the following:
foo: false
myObject.myProperty: true

An event frame later, foo becomes true as well. 
Is this behaviour normal? 
EDIT: 
Here is a working example:
MyClass.h:
#pragma once

#include <QObject>

class MyClass : public QObject {
Q_OBJECT

    Q_PROPERTY(bool myProperty_1 READ getMyProperty_1 NOTIFY myClassChanged)
    Q_PROPERTY(bool myProperty_2 READ getMyProperty_2 NOTIFY myClassChanged)

public:
    static void initQML();

    MyClass();

    bool getMyProperty_1();
    bool getMyProperty_2();

    Q_INVOKABLE void setMyProperty(bool value);

signals:
    void myClassChanged();

private:
    bool m_MyProperty_1;
    bool m_MyProperty_2;
};

MyClass.cpp:
#include "MyClass.h"

#include <QtQml>
#include <QDebug>
#include <QMetaType>

/*static*/ void MyClass::initQML() {
    qmlRegisterType<MyClass>("Test", 1, 0, "MyClass");
}

MyClass::MyClass() : m_MyProperty_1(false), m_MyProperty_2(false) {
    qDebug() << "Constructor called."; 
}

bool MyClass::getMyProperty_1() {
    return m_MyProperty_1;
}

bool MyClass::getMyProperty_2() {
    return m_MyProperty_2;
}

void MyClass::setMyProperty(bool value) {
    m_MyProperty_1 = value;
    m_MyProperty_2 = value;
    myClassChanged();
}

main.cpp:
#include <QGuiApplication>
#include <QQmlApplicationEngine>

#include "MyClass.h"

int main(int argc, char *argv[])
{
    QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

    QGuiApplication app(argc, argv);

    // Init

    MyClass::initQML();

    // Main loop

    QQmlApplicationEngine engine;
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

    return app.exec();
}

main.qml:
import QtQuick 2.9
import QtQuick. Controls 2.2

import QtQml. StateMachine 1.0 as QtQml_StateMachine

import Test 1.0

ApplicationWindow {
    visible: true

    width: 480
    height: 272

    Component.onCompleted: _stateMachine.start()

    // UI

    Button {
        text: "Switch"

        onClicked: {
            console.info("Switch pressed with setter")
            myClass.setMyProperty(true)
        }
    }

    // StateMachine

    property MyClass myClass: MyClass {}

    QtQml_StateMachine. StateMachine {
        id: _stateMachine

        initialState: _defaultState

        onStarted: console.info("_stateMachine started")
        onExited: console.info("_stateMachine exited")

        QtQml_StateMachine. State {
            id: _defaultState

            property bool myProperty_1: myClass.myProperty_1
            property bool myProperty_2: myClass.myProperty_2

            onMyProperty_1Changed: console.info("onMyProperty_1Changed: " + myProperty_1)
            onMyProperty_2Changed: console.info("onMyProperty_2Changed: " + myProperty_2)

            onEntered: console.info("_defaultState entered")
            onExited: console.info("_defaultState exited")

            // Doesn't work:
            QtQml_StateMachine. SignalTransition {
                targetState: _nextState
                signal: _defaultState.myProperty_1Changed
                guard: _defaultState.myProperty_2
                onTriggered: console.info("myProperty_2")
            }

              // Works:
//            QtQml_StateMachine. SignalTransition {
//                targetState: _nextState
//                signal: _defaultState.myProperty_1Changed
//                guard: myClass.myProperty_2
//                onTriggered: console.info("myClass.myProperty_2")
//            }
        }

        QtQml_StateMachine. State {
            id: _nextState

            onEntered: console.info("_nextState entered")
            onExited: console.info("_nextState exited")
        }
    }
}

If you use the commented SignalTransition it works.  If you use the other one it won't work. 

A:

The issue is that there is a race condition, due to proxying the C++ object's properties to have individual Changed signals.  This is due to the direct connections in QML. 
The update works in the following order:
myClassChanged -> set: m_MyProperty_1 (C++) -> signal myProperty_1Changed (QML) -> transition and hit the guard, then -> set: m_MyProperty_2 (C++) -> signal m_MyProperty_2Changed (QML)
so myProperty_1 racing against myProperty_2.