Add header to test program - automoc doesnt update mocs otherwise
Fix attribute location calculation