It works fine for me but im not driving it with a scalar.
in my case I set the custom node to analayze RGB of the input and eliminate the pathway if no color is in use (0,0,0)
I had to rewrite the custom node a bit, each channel needs its own check.
Either way the branching compiles and does its job just fine.
I would suggest you change the custom node to check if a value is equal to rather then greater than.
Otherwise floating point precision could also be an issue.
just eliminate the branch when the scalar is == 0 and see if that makes any difference…