ENH factor out squared norm helper