Fix use of $flags in Compute()

The `$flags` variable is a has reference, and there is no `%flags` variable, so `$flags{...}` should be `$flags->{...}`.