The alignment tool is selecting the top most layer where ever you click instead of the selected layer of the layer tree.
This makes it impossible to align some layers without a huge workaround.
And if the layer is in a group, it's impossible as it selects the whole group.
See, lots of persons have this problem: https://graphicdesign.stackexchange.com/questions/27948/why-cant-the-gimp-align-tool-select-some-layers