Fix Issue 12653 - Implement the getFunctionAttributes trait.
Merge pull request #3501 from AndrejMitrovic/Fix12653

Issue 12653 - Implement the getFunctionAttributes trait.