You are right, it happens after the accessor. Thank you - problem solved!
The n-command is not intuitive in if/elsif/else constructs - at least not for me. Reading the documentation helped ;-)
In case someone struggles with the same error - you probably did this: