Swap order of checks in `get_htlc_balance`