Fix extract_features bug for features from multiple layers.