small optimization by reducing number of checks
only move non-first elements to front (rare case)