Fixed issue in implementation of #326
Improved parentheses handling
Authored by: numere 2018-05-07
Parent: [r327]
Child: [r329]