this is not a bug, this is intended behavior, the code that you pointed out is about finding roles that user belongs to and that's why it has additional property (ldap.user.roles.ctx) that is optional and if not given the regular context for roles will be used. Please ensure that you provide all mandatory properties in your configuration file - see java docs given previously otherwise you'll experience different issues.
HTH