THROW is not returning the correct line number when variables are used
Is this to be expected and a known flaw or am I doing something wrong?


Yes, it is the expected behavior. You've generated a new error message, and it originates at the call site of THROW ....  This is why you should favor just THROW; or you need to encapsulate all the relevant error context information in your message.