H264_SVC Temporal Layer Upgrade question

I’ve been studying the H264_SVC::PayloadDescriptorHandler::Process method and have a question about the intended behavior of the temporal layer upgrade logic. I’ve encountered a scenario that I’d like to understand better.

The code block responsible for upgrading the temporal layer is as follows:

// ...
// Upgrade current temporal layer if needed.
if (context->GetTargetTemporalLayer() > context->GetCurrentTemporalLayer())
{
    // clang-format off
    if (
        packetTemporalLayer >= context->GetCurrentTemporalLayer() + 1 &&
        this->payloadDescriptor->s
    )
    // clang-format on
    {
        // ...
        tmpTemporalLayer = packetTemporalLayer;
    }
}
// ...

This logic checks if an upgrade is desired and if the incoming packet is a safe point to perform the switch (start of a frame). However, it does not constrain the upgrade to the targetTemporalLayer.

I would like to understand the original intent behind this design. Is this behavior intentional?

Thank you for your time and clarification.