The issue was I was using GetFeature, rather than GetNextFeature.
This looped through the features in the layer, rather than features in queried/selected layer.
The issue was I was using GetFeature, rather than GetNextFeature.
This looped through the features in the layer, rather than features in queried/selected layer.