Fix typo in getting line number

The closing parenthesis was in the wrong place resulting in the default value not getting set. This adds a test case.