Fix legpts for n = 1 and n = 2 on general domains [a,b].

Closes #1107.