Merge "SurfaceUtils: ensure lock() grants a valid pointer" into main