Make a feature detect for the attribute selected code. Fixes #5702.