Hi Greg,
This patch is pretty straightforward, but I'm posting it here because the fact that you were explicitly casting to reference through an instance suggests that maybe there's a design problem you overlooked. OTOH, it's possible this patch is fine. LMK