I think, it's a bug. It was denied to have write access to the temporary variable, but you request only read access which is safe to be provided.