Structural anomalies disturbing measurement of the quantum size effect