The "select same" (fill/stroke/style) functions current do not obey the select-all options, which means they select all items in all layers. This leads to some interesting UX confusion between the functions.
This merge request adds a feature which is turned off by default, but when activated will make the select-same features function like the select-all, using the same preferences to see the context (layer-only, layer-plus-children and 'all objects'). Because setting this to true would incur a big behaviour change in Inkscape I've made it optional. I can then ask the UX team to test the differences between this being set and unset on existing users at a later date.