Merge "Fix double counting of compound reference bit cost." into nextgenv2