In bootloader, line 1456, it is being picked the maximum between the refund provided by the operator and the one calculated by the bootloader plus the initial excess of gas. As askOperatorForRefund is called with the leftover gas found by the bootloader, it will return a value less than reservedGas + gasLeft so the max function is broken. Consider doing the same as in:
bootloader, lines 914 to 921
That is, rewrite:
bootloader, lines 1450 to 1456
